//Start is the first position in the map, The places that creeps can enter from
// This value can be an array and will handle it internally if it is an array.
//

function Level(a_Start,a_height,a_width) {
	this.RawMapArray = [];
	this.MapArray = [];
	this.height = a_height;
	this.width = a_width;
	this.MapBuilder = BuildMap;
	this.Start = [];
	this.itt = -1;
	this.addMapData = function(a_data) {
		this.MapArray[this.MapArray.length] = a_data;
	}
	this.SetMapData = function() {
		for(var i = 0;i < this.RawMapArray.length;i++) {
			if(this.RawMapArray[i] != null) {
				this.MapArray[this.MapArray.length] = this.RawMapArray[i];
			}
		}
		this.RawMapArray = null;
	}
	this.AddStart = function(a_S) {
		this.Start[this.Start.length] = a_S;
	}
	this.getStart = function (){
		if(this.Start != null && this.Start[this.itt + 1] != null)
			this.itt += 1;
		else this.itt = 0;
		return this.Start[this.itt];
	}
}